Repository navigation
feat(macos): add an optional native menu bar - #248
Closed
offline-first wants to merge 2 commits into
Closed
offline-first wants to merge 2 commits into
offline-first wants to merge 2 commits into
Conversation
Member
|
Thank you for this, and for testing it on a real Mac. It moved the long-deferred tray (#1) forward, and your AppKit adapter lives on in #249, where you are credited as co-author. We are closing this PR in favour of #249 for two reasons:
What changed in your adapter: the menu model moved to |
7schmiede
added a commit
that referenced
this pull request
Oct 23, 2026
…hub (ADR-0060) (#249) * docs(adr): ADR-0060 the tray is a client of the hub, a process of its own, on every desktop ADR-0018 put a tray in the daemon, ADR-0021 moved it to the hub, ADR-0045 took the notifications out of it. A contribution for macOS (#248) built a menu bar client as a separate process and showed why: AppKit wants the main thread, which the hub's server has. It also read every daemon's state and judged it on its own, a third reading beside the dashboard's and the notifications'. The tray is `devstack tray` on every platform, started by the hub (off with `devstack hub tray off` or `DEVSTACK_NO_TRAY`), a client of the hub: `GET /hub/summary` says what it shows, the same as what notifies; its actions are the dashboard's requests. One menu model, drawn per platform (Shell_NotifyIconW, a StatusNotifierItem over zbus so the Linux binary stays static, an NSStatusItem). ADR-0018 point 2 and ADR-0021 are amended. Refs #1, #248 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(tray): a tray icon on Windows, Linux and macOS, a client of the hub (ADR-0060) The hub starts `devstack tray` (unless `devstack hub tray off`, `DEVSTACK_NO_TRAY`, or no desktop): the dashboard's mark, green when something runs, amber while a stack starts or stops, red when something needs attention, grey when nothing runs. Its menu opens the dashboard, lists every registered stack with what needs attention (a click opens that service), and starts, stops or opens a stack's folder, each a request to the hub as the dashboard makes it. Quitting it stops nothing. - `GET /hub/summary`: every stack at a glance and one state over all. What needs attention comes from the streams the hub follows for its notifications (`notify::rules::Scope::glance`), so the tray, the notifications and the dashboard agree; a failed start from the dashboard too. - `devstack-desktop::tray`: one menu model, drawn per platform. Windows: `Shell_NotifyIconW` on a hidden window, re-added when Explorer restarts. Linux: a StatusNotifierItem with a dbusmenu over zbus, so the binary stays static; it registers again when a watcher appears. macOS: the AppKit status item from #248, tinted by state. - One tray per user (a lock beside the hub's state); a tray of an older devstack than the hub's hands over to the new one. `devstack hub tray [on|off]`; `self uninstall` ends it with the hub. Checked live on Ubuntu's GNOME (AppIndicator): the item registers, the menu follows the summary, Stop, Start and Start Dashboard Hub work, off, on and Quit end it. Windows and macOS are checked by clippy for their targets only; docs/macos.md lists what a tester checks. Closes #1 Replaces #248 Co-authored-by: offline-first <2144520+offline-first@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: offline-first <2144520+offline-first@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
macOS currently has no persistent entry point for the dashboard or registered stacks. This adds an optional
devstack menubarcommand: one native AppKit status item with devstack's template logo, without a Dock window.The menu provides:
down --infracommand without--all.Status collection and CLI actions run away from AppKit's main thread. The menu does not start a stopped hub during refresh, and shows progress/errors rather than silently assuming success. It installs no login integration. AppKit dependencies are macOS-only; other platforms report that the command is unavailable.
ADR-0060 is Proposed for maintainer review. This refines the unimplemented per-daemon tray idea in ADR-0018 into one optional client of the existing hub/registry. Related to #1 and the macOS preview in #66.
Validation
npm run build,cargo fmt --all -- --check,cargo clippy --workspace --all-targets --locked -- -D warnings, andcargo test --workspace --locked --no-fail-fast -- --test-threads=4pass with Rust 1.98. Existing ignored integration tests remain ignored; this manual menu test did not exercise Docker.Screenshot
Only invented demo stack names are shown. Usage and a real-Mac verification checklist are in
docs/macos.md.